﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Web.API.IBLL;
using Web.API.Model;

namespace Web.API.UI.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class UserController : ControllerBase
    {
        public UserController(UserIBLL bll) 
        {
            Bll = bll;
        }
        public  UserIBLL Bll { get; }
        [HttpPost("AddUser")]
        public Task<int> AddUser(UserModel user)
        {
            return Bll.AddUser(user);
        }
        [HttpGet("Login")]
        public UserModel Login(string name, string pos)
        {
           return Bll.Login(name, pos);
        }
    }
}
